<%--
  Created by IntelliJ IDEA.
  User: 31036
  Date: 2025/4/9
  Time: 10:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<div id="main" style="height: 500px;width: 1500px"></div>
<div id="main1" style="height: 500px;width: 500px"></div>
</body>
</html>
<script src="../../static/js/echarts.js"></script>
<script>
  var chartDom = document.getElementById('main');
  var myChart = echarts.init(chartDom);
  var option;

  option = {
    xAxis: {
      type: 'category',
      data: ${list1}
    },
    yAxis: {
      type: 'value'
    },
    series: [
      {
        data: ${list},
        type: 'line'
      }
    ]
  };

  option && myChart.setOption(option);

</script>
<script>
    var chartDom = document.getElementById('main1');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        title: {
            text: 'World Population'
        },
        tooltip: {
            trigger: 'axis',
            axisPointer: {
                type: 'shadow'
            }
        },
        legend: {},
        grid: {
            left: '3%',
            right: '4%',
            bottom: '3%',
            containLabel: true
        },
        xAxis: {
            type: 'value',
            boundaryGap: [0, 0.01]
        },
        yAxis: {
            type: 'category',
            data: ["1号停车场","2号停车场","3号停车场"]
        },
        series: [
            {
                name: '小型车',
                type: 'bar',
                data: ${list2}
            },
            {
                name: '大型车',
                type: 'bar',
                data: ${list3}
            }
        ]
    };

    option && myChart.setOption(option);
</script>
